<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ include file="/WEB-INF/layout/header.jsp"%>

<h1>
	<fmt:message key="invoice.view" />
</h1>
<c:if test="${not empty invoice}">
	<div class="span-24">
		<form:form modelAttribute="invoice" action="${invoice}" method="post">
			<fieldset>
				<legend>
					<fmt:message key="invoice.details" />
				</legend>
				<p>
					<form:label for="invoiceDate" path="invoiceDate"><fmt:message key="invoice.invoiceDate" /></form:label>
					<br />
					<form:input path="invoiceDate" readonly="true" />
				</p>
				<p>
					<form:label for="invoiceDueDate" path="invoiceDueDate"><fmt:message key="invoice.invoiceDueDate" /></form:label>
					<br />
					<form:input path="invoiceDueDate" readonly="true" />
				</p>
				<p>
					<form:label for="amountDue" path="amountDue"><fmt:message key="invoice.amountDue" /></form:label>
					<br />
					<form:input path="amountDue" readonly="true" /><strong><fmt:message key="invoice.currency" /></strong>
				</p>
				<p>
					<form:label for="meteringReadingId" path="meteringReadingId"><fmt:message key="invoice.meteringReadingId" /></form:label>
					<br />
					<form:input path="meteringReadingId" readonly="true" />
				</p>
				<p>
					<form:label for="facility" path="facility"><fmt:message key="invoice.facility" /></form:label>
					<br />
					<form:input path="facility" readonly="true" />
				</p>
			</fieldset>
		</form:form>
		<a href="/meterdata"><fmt:message key="meterdata.list" /></a>
	</div>
</c:if>

<%@ include file="/WEB-INF/layout/footer.jsp"%>